<template>
  <div>
    <span class="recommondDoctor">名医推荐</span>
    <ul
      v-for="(doctor, index) in recommondList"
      :key="index"
      class="recommondDoctorList"
      @click="getDoctorDetail(doctor)"
    >
      <li>
        <div class="container">
          <img src="../../../../../public/image/user1.png" />
          <h3 class="doctorDetail">
            <span>刘妙春</span>
            <i>主任医师</i>
          </h3>
        </div>
      </li>
      <li>
        <div class="container">
          <img src="../../../../../public/image/user2.png" />
          <h3 class="doctorDetail">
            <span>李民</span>
            <i>主任医师</i>
          </h3>
        </div>
      </li>
      <li>
        <div class="container">
          <img src="../../../../../public/image/user3.png" />
          <h3 class="doctorDetail">
            <span>夏群</span>
            <i>主任医师</i>
          </h3>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  props: {
    recommondList: Array
  },
  methods: {
    getDoctorDetail(doctor) {
      console.log(doctor);
    }
  }
};
</script>

<style lang="scss" scoped>
.hotSearch,
.hotDepartment,
.recommondDoctor {
  box-sizing: border-box;
  display: inline-block;
  padding: 0 20rpx;
  line-height: 60rpx;
  height: 60rpx;
  width: 100%;
  font-size: 24rpx;
  background-color: #fafafa;
  color: #898989;
}
.recommondDoctor {
  border-top: 1px solid #e1e1e1;
  border-bottom: 1px solid #e1e1e1;
}
.recommondDoctorList {
  padding-bottom: 30rpx;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  li {
    width: 33.3333333%;
    padding-top: 30rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    .container {
      text-align: center;
      img {
        width: 120rpx;
        height: 120rpx;
        border-radius: 60rpx;
      }
      .doctorDetail {
        padding-top: 4rpx;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 24rpx;
        color: #000000;
        span {
          margin-right: 14rpx;
        }
      }
    }
  }
}
</style>